﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using ShopShop.Models;

namespace ShopShop.Controllers
{
    public class ProductController : Controller
    {
        BanGiayEntities db = new BanGiayEntities();
        //
        // GET: /Product/

        public ActionResult Index()
        {
            var product = db.Products.ToList();
            return View(product);
        }

        public ActionResult Detail(int id)
        {
            var product = db.Products.Single(x => x.ProductId == id);
            return View(product);
        }
    }
}
